class CreateComments < ActiveRecord::Migration
  def self.up
    create_table :comments do |t|
      t.text :body
      t.integer :user_id,	:null => false, :options => 'CONSTRAINT fk_comment_belong_user REFERENCES users(id)'
      t.integer :itinerary_id,	:null => false, :options => 'CONSTRAINT fk_comment_belong_iti REFERENCES itinerary(id)'

      t.timestamps
    end
  end

  def self.down
    drop_table :comments
  end
end
